package com.vcms.cms.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ContentCheck entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "content_check", catalog = "vcms_0.1")
public class ContentCheck implements java.io.Serializable {

	// Fields

	private Integer contentCheckId;
	private Content content;
	private User user;
	private Integer checkStep;
	private String checkOpinion;
	private Boolean isRejected;
	private Integer reviewer;
	private Timestamp checkDate;

	// Constructors

	/** default constructor */
	public ContentCheck() {
	}

	/** full constructor */
	public ContentCheck(Content content, User user, Integer checkStep,
			String checkOpinion, Boolean isRejected, Integer reviewer,
			Timestamp checkDate) {
		this.content = content;
		this.user = user;
		this.checkStep = checkStep;
		this.checkOpinion = checkOpinion;
		this.isRejected = isRejected;
		this.reviewer = reviewer;
		this.checkDate = checkDate;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "contentCheckId", unique = true, nullable = false)
	public Integer getContentCheckId() {
		return this.contentCheckId;
	}

	public void setContentCheckId(Integer contentCheckId) {
		this.contentCheckId = contentCheckId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contentId")
	public Content getContent() {
		return this.content;
	}

	public void setContent(Content content) {
		this.content = content;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userId")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "checkStep")
	public Integer getCheckStep() {
		return this.checkStep;
	}

	public void setCheckStep(Integer checkStep) {
		this.checkStep = checkStep;
	}

	@Column(name = "checkOpinion", length = 500)
	public String getCheckOpinion() {
		return this.checkOpinion;
	}

	public void setCheckOpinion(String checkOpinion) {
		this.checkOpinion = checkOpinion;
	}

	@Column(name = "isRejected")
	public Boolean getIsRejected() {
		return this.isRejected;
	}

	public void setIsRejected(Boolean isRejected) {
		this.isRejected = isRejected;
	}

	@Column(name = "reviewer")
	public Integer getReviewer() {
		return this.reviewer;
	}

	public void setReviewer(Integer reviewer) {
		this.reviewer = reviewer;
	}

	@Column(name = "checkDate", length = 19)
	public Timestamp getCheckDate() {
		return this.checkDate;
	}

	public void setCheckDate(Timestamp checkDate) {
		this.checkDate = checkDate;
	}

}